<%-- 
    Document   : sendMessage
    Created on : Mar 4, 2014, 10:36:09 PM
    Author     : Jordan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<c:set scope="request" var="title" value="Message"/>

<sql:setDataSource user="root" password="" driver="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost/bonix"/>

<sql:update sql = "INSERT INTO messages(sender,receiver,msg,sent_date) VALUES ('gamby',?,?,now())">
    <sql:param value="${fn:trim(param.receiver)}"/> 
    <sql:param value="${fn:trim(param.message)}"/>

</sql:update>

<!DOCTYPE html>
<html>
    <jsp:include page="head.jsp"/>

    <body>
        <jsp:include page="header.jsp"/>

        <div class="row">
            <div class="container">
                <div class="content row">

                    <div class="containerService">
                        <div class="panel panel-info">

                            <div class="panel-heading">
                                <%--<jsp:include page="msgHeader.jsp"/>--%>
                                <ul class="navClient navClient-pills">   
                                    <li><a href='messages.jsp?receiver=gamby'> Message Inbox </a></li>
                                    <li class="active"><a href='compose.jsp'> Compose Message </a></li>						
                                    <li><a href='sendItems.jsp'> Sent Item </a></li>
                                </ul>
                            </div>

                            <div class="panel-body">
                                <c:redirect url="messages.jsp?receiver=gamby"/>
                            </div><!-- END panel-body -->

                        </div><!-- END panel-info -->
                    </div><!-- END containerService -->

                </div><!-- END CONTENT CONTENT ROW -->
            </div><!-- END CONTAINER -->
        </div><!-- END ROW -->

        <jsp:include page="footer.jsp"/>

    </body>
</html>
